<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ page import="java.sql.ResultSet" %>
<%@ page import="java.sql.SQLException" %>
<%@ page import="java.util.logging.Level,java.util.logging.Logger" %>
<%@ page import="java.sql.Statement"%>
<%@page import="java.sql.Connection,java.sql.DriverManager" %>
<%@ page import="java.net.URLDecoder" %>

<%
	
	
	//wanted_movie_src = "movie_1";
	//user_name = "lilit";
	//user_password = "24213";
	
	Connection con=null;
	Statement stmt=null;
	ResultSet rs=null;
	String return_user_name = "";
	String driver="com.mysql.cj.jdbc.Driver";
	String url="jdbc:mysql://localhost:3306/android?serverTimezone=GMT&characterEncoding=utf-8";
	String user="root";
	String passwd="HandQuite229";
    try{
       Class.forName(driver);
       con=DriverManager.getConnection(url, user, passwd);
       if (con == null)
      		System.out.println("con is null");
       }catch(ClassNotFoundException e){
           out.println(e);
       }catch(SQLException e){
    	   out.println(e);
       }
	
	try{
		stmt=con.createStatement();
		String sql2 = "select * from user_info where user_name = '" + "张三" + "'";
		
		System.out.println(sql2);
		rs = stmt.executeQuery(sql2);
		while(rs.next()){
			return_user_name = rs.getString(1);
		}
		System.out.println(return_user_name);
		out.println("[{\"return_user_name\":\"" + return_user_name + "\"}]");
		
		
		con.close();
	}catch (SQLException ex) {
		out.println(ex);
	}
%>
